package main

import (
	"fmt"
	"unsafe"
)

func 有符号() {
	var i int8 = 1
	var j int16 = 1000
	var k int32 = 1000
	var l int64 = 1000
	fmt.Println(i)
	fmt.Println(j)
	fmt.Println(k)
	fmt.Println(l)
}
func unit1() {
	var i uint8 = 1
	var j uint16 = 1000
	var k uint32 = 1000
	var l uint64 = 1000
	fmt.Println(i)
	fmt.Println(j)
	fmt.Println(k)
	fmt.Println(l)
}
func main() {
	var i int = 1
	var j uint = 1
	var k rune = 1
	var l byte = 'A'
	fmt.Printf("%T", i)
	fmt.Println(j)
	fmt.Println(k)
	fmt.Println(l)

	x := 10
	// Printf() 格式化输出
	fmt.Printf("x的类型是%T \n", x) // x的类型是int

	fmt.Printf("%d \n", unsafe.Sizeof(i))

	fmt.Printf("%T  %d", i, unsafe.Sizeof(i))
}
